3.2.88 \(\int (b \cos (c+d x))^n (A+C \cos ^2(c+d x)) \sec ^3(c+d x) \, dx\) [188]

Optimal. Leaf size=125 \[ -\frac {b^2 C (b \cos (c+d x))^{-2+n} \sin (c+d x)}{d (1-n)}+\frac {b^2 (A (1-n)+C (2-n)) (b \cos (c+d x))^{-2+n} \, _2F_1\left (\frac {1}{2},\frac {1}{2} (-2+n);\frac {n}{2};\cos ^2(c+d x)\right ) \sin (c+d x)}{d (1-n) (2-n) \sqrt {\sin ^2(c+d x)}} \]

[Out]

-b^2*C*(b*cos(d*x+c))^(-2+n)*sin(d*x+c)/d/(1-n)+b^2*(A*(1-n)+C*(2-n))*(b*cos(d*x+c))^(-2+n)*hypergeom([1/2, -1
+1/2*n],[1/2*n],cos(d*x+c)^2)*sin(d*x+c)/d/(n^2-3*n+2)/(sin(d*x+c)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {16, 3093, 2722} \begin {gather*} \frac {b^2 (A (1-n)+C (2-n)) \sin (c+d x) (b \cos (c+d x))^{n-2} \, _2F_1\left (\frac {1}{2},\frac {n-2}{2};\frac {n}{2};\cos ^2(c+d x)\right )}{d (1-n) (2-n) \sqrt {\sin ^2(c+d x)}}-\frac {b^2 C \sin (c+d x) (b \cos (c+d x))^{n-2}}{d (1-n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(b*Cos[c + d*x])^n*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^3,x]

[Out]

-((b^2*C*(b*Cos[c + d*x])^(-2 + n)*Sin[c + d*x])/(d*(1 - n))) + (b^2*(A*(1 - n) + C*(2 - n))*(b*Cos[c + d*x])^
(-2 + n)*Hypergeometric2F1[1/2, (-2 + n)/2, n/2, Cos[c + d*x]^2]*Sin[c + d*x])/(d*(1 - n)*(2 - n)*Sqrt[Sin[c +
 d*x]^2])

Rule 16

Int[(u_.)*(v_)^(m_.)*((b_)*(v_))^(n_), x_Symbol] :> Dist[1/b^m, Int[u*(b*v)^(m + n), x], x] /; FreeQ[{b, n}, x
] && IntegerQ[m]

Rule 2722

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*((b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1
)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n
}, x] &&  !IntegerQ[2*n]

Rule 3093

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Cos
[e + f*x]*((b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Dist[(A*(m + 2) + C*(m + 1))/(m + 2), Int[(b*Sin[e +
f*x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] &&  !LtQ[m, -1]

Rubi steps

\begin {align*} \int (b \cos (c+d x))^n \left (A+C \cos ^2(c+d x)\right ) \sec ^3(c+d x) \, dx &=b^3 \int (b \cos (c+d x))^{-3+n} \left (A+C \cos ^2(c+d x)\right ) \, dx\\ &=-\frac {b^2 C (b \cos (c+d x))^{-2+n} \sin (c+d x)}{d (1-n)}+\left (b^3 \left (A+\frac {C (2-n)}{1-n}\right )\right ) \int (b \cos (c+d x))^{-3+n} \, dx\\ &=-\frac {b^2 C (b \cos (c+d x))^{-2+n} \sin (c+d x)}{d (1-n)}+\frac {b^2 \left (A+\frac {C (2-n)}{1-n}\right ) (b \cos (c+d x))^{-2+n} \, _2F_1\left (\frac {1}{2},\frac {1}{2} (-2+n);\frac {n}{2};\cos ^2(c+d x)\right ) \sin (c+d x)}{d (2-n) \sqrt {\sin ^2(c+d x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.18, size = 114, normalized size = 0.91 \begin {gather*} -\frac {(b \cos (c+d x))^n \csc (c+d x) \left (A n \, _2F_1\left (\frac {1}{2},\frac {1}{2} (-2+n);\frac {n}{2};\cos ^2(c+d x)\right )+C (-2+n) \cos ^2(c+d x) \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {2+n}{2};\cos ^2(c+d x)\right )\right ) \sec ^2(c+d x) \sqrt {\sin ^2(c+d x)}}{d (-2+n) n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(b*Cos[c + d*x])^n*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^3,x]

[Out]

-(((b*Cos[c + d*x])^n*Csc[c + d*x]*(A*n*Hypergeometric2F1[1/2, (-2 + n)/2, n/2, Cos[c + d*x]^2] + C*(-2 + n)*C
os[c + d*x]^2*Hypergeometric2F1[1/2, n/2, (2 + n)/2, Cos[c + d*x]^2])*Sec[c + d*x]^2*Sqrt[Sin[c + d*x]^2])/(d*
(-2 + n)*n))

________________________________________________________________________________________

Maple [F]
time = 0.20, size = 0, normalized size = 0.00 \[\int \left (b \cos \left (d x +c \right )\right )^{n} \left (A +C \left (\cos ^{2}\left (d x +c \right )\right )\right ) \left (\sec ^{3}\left (d x +c \right )\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*cos(d*x+c))^n*(A+C*cos(d*x+c)^2)*sec(d*x+c)^3,x)

[Out]

int((b*cos(d*x+c))^n*(A+C*cos(d*x+c)^2)*sec(d*x+c)^3,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*cos(d*x+c))^n*(A+C*cos(d*x+c)^2)*sec(d*x+c)^3,x, algorithm="maxima")

[Out]

integrate((C*cos(d*x + c)^2 + A)*(b*cos(d*x + c))^n*sec(d*x + c)^3, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*cos(d*x+c))^n*(A+C*cos(d*x+c)^2)*sec(d*x+c)^3,x, algorithm="fricas")

[Out]

integral((C*cos(d*x + c)^2 + A)*(b*cos(d*x + c))^n*sec(d*x + c)^3, x)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*cos(d*x+c))**n*(A+C*cos(d*x+c)**2)*sec(d*x+c)**3,x)

[Out]

Exception raised: SystemError >> excessive stack use: stack is 3006 deep

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*cos(d*x+c))^n*(A+C*cos(d*x+c)^2)*sec(d*x+c)^3,x, algorithm="giac")

[Out]

integrate((C*cos(d*x + c)^2 + A)*(b*cos(d*x + c))^n*sec(d*x + c)^3, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (C\,{\cos \left (c+d\,x\right )}^2+A\right )\,{\left (b\,\cos \left (c+d\,x\right )\right )}^n}{{\cos \left (c+d\,x\right )}^3} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + C*cos(c + d*x)^2)*(b*cos(c + d*x))^n)/cos(c + d*x)^3,x)

[Out]

int(((A + C*cos(c + d*x)^2)*(b*cos(c + d*x))^n)/cos(c + d*x)^3, x)

________________________________________________________________________________________